package TEST.day04;
public  class  Test {
    public void swap(int a, int b, int... x) {
        int t = a;
        a = b;
        b = t;
        for (int i = 0; i < x.length / 2; i++) {
            t = x[i];
            x[i] = x[x.length - 1 - i];
            x[x.length - 1 - i] = t;
        }
    }

    public static void main(String[] args) {
        int a = 1, b = 2, c = 4, d = 5;
        int[] array = new int[]{3, 6, 7};
        Test te = new Test();
        te.swap(a, b, array);
        System.out.println("(a,b,array[0],array[1],array[2])=(" + a + "," + b + "," + array[0] + "," + array[1] + "," + array[2] + ")");
        te.swap(a, b, c, d);
        System.out.println("(a,b,c,d)=("+ a + "," + b + "," + c + "," + d + ")");
    }
}

